<style>
.jylabel-switch {padding:0.3rem 0.5rem;}
.jylabel-switch.active{
	border-radius:1.5rem;
	background-color:#00c568;
	color:#fff;
}
</style>
<div class='fui-page-group' ng-if="pagedata.op == 'main'">
<div class='fui-page  fui-page-current'>
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">{{pagedata.pluginset.shifutitle}}中心</div>
		<div class="fui-header-right"></div>
	</div>
	<div class='fui-content'>
		<div style="background: {{main.syscolor||'#05c175'}};padding:1rem 0.5rem;margin-top:0;padding-bottom:1.6rem;">
			<div class="fui-cellone" style="padding:0">
				<div class="fui-cellone-label" style="width:auto;">
					<img style="border-radius: 0.2rem;width:2.2rem;height:2.2rem" ng-src="{{tomedia(pagedata.worker.headimg) || '../core/resource/images/nopic.jpg'}}" />
				</div>
				<div class="fui-cellone-text" style="font-size:0.7rem;color:#fff;padding-left:0.5rem">
					<div style="padding-bottom:0.2rem">
						<span class="bold">{{pagedata.worker.title || '匿名用户'}} </span>
						<span class="bold red">({{pagedata.worker.type==1?'技术员':pagedata.pluginset.shifutitle}})</span>
					</div>
					<div ng-if="pagedata.worker.isvip==1" style="font-size:0.6rem;padding:0.3rem 0">
						有效期:{{pagedata.worker.viptime}} 
						<span style="color:#FCC600;" ng-click="access_json('/setyajin/')">续费>></span>
					</div>
					<div class="jylabel jylabel-switch-label">
							<span ng-class="{'jylabel-switch':1,'active':pagedata.worker.online==1}" ng-click="pagedata.worker.online=1;post({'id':pagedata.worker.id,'online':1},'jy_wxshifu/index/setonline/');">上线</span>
							<span ng-class="{'jylabel-switch':1,'active':pagedata.worker.online==0}" ng-click="pagedata.worker.online=0;post({'id':pagedata.worker.id,'online':0},'jy_wxshifu/index/setonline/');">离线</span>
					</div>
				</div>
				<div class="fui-cellone-remark noremark" style="font-size:0.7rem;color:#fff;" href="javascript:;" ng-click="access_json('jy_wxshifu/index/set/')">
					 <a style="border-radius: 1rem;padding:0.2rem 0.3rem;font-size:0.6rem; background-color: rgb(255, 255, 255, 0.3);;width:auto;color:#fff"><i class="icon icon-qiehuan" style="font-size:0.6rem"></i> 设置</a>
				</div>
			</div>	
			<div class="fui-icon-group noborder  col-3" style="padding-top:0.5rem">
					<div class="fui-icon-col-sm external" style="margin:0">
													<div  href="javascript:;" ng-click="access_json('jy_wxshifu/worker_order//today=1')">
														<div class="subtitle" style="font-size:0.7rem;color:#fff">今日业绩</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.worker.today_money || '0.00'}}</div>
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div  href="javascript:;" ng-click="access_json('jy_wxshifu/worker_order//today=1')">
														<div class="subtitle" style="font-size:0.7rem;color:#fff">今日送单数</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.worker.today_num || 0}}</div>
														
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div href="javascript:;" ng-click="access_json('jy_wxshifu/worker_order/')">
														<div class="subtitle" style="font-size:0.7rem;color:#fff">总业绩</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.worker.all_money || 0}}</div>
													</div>
					</div>
			</div>			
		</div>
		<div style="padding:0.5rem;margin-top:-2.5rem">
			<div class="fui-cell-group fui-cell-click mod-group radius">
					<a class="fui-cell">
								<div class="fui-cell-icon"><i class="icon icon-caifua"></i></div>
								<div class="fui-cell-text">
									<div>总提成:￥ <span class="red">{{pagedata.get_money || '0.00'}}</span> （可结算:￥ <span class="red">{{pagedata.yesget_money || '0.00'}}</span>）</div>
									<div class="subtitle" style="font-size:0.65rem">只能结算{{pagedata.pluginset.cash_day || 1}}天前的提成！</div>
								</div>
								<div ng-click="access_json('jy_wxshifu/tixian/')" class="fui-cell-remark noremark">
									<span class="jylabel jylabel-success" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">结算</span>
								</div>
					</a>
					<a class="fui-cell">
								<div class="fui-cell-icon"><i class="icon icon-erweima"></i></div>
								<div class="fui-cell-text">
								 我的二维码
								</div>
								<div href="javascript:;" ng-click="pagedata.showyewu=true;pagedata.show_verify();" class="fui-cell-remark">
									查看
								</div>
					</a>
			</div>
			<div class="fui-cell-group fui-cell-click mod-group">
							<a class="fui-cell external" href="javascript:;" ng-click="access_json('jy_wxshifu/worker_order/')">
								<div class="fui-cell-text bold">日常操作</div>
								<div class="fui-cell-remark" style="font-size: 0.65rem;">查看服务</div>
							</a>
							<div class="fui-icon-group col-3 selecter">
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_wxshifu/worker_order/')">
									<div class="icon icon-pink radius"><i class="icon icon-quanbudingdan"></i></div>
									<div class="text">我的服务</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_wxshifu/order_log/')">
									<div class="icon icon-pink radius"><i class="icon icon-caifua"></i></div>
									<div class="text">我的收益</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_wxshifu/shifucomments/')">
									<div class="icon icon-pink radius"><i class="icon icon-liaotian"></i></div>
									<div class="text">我的评价</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_wxshifu/cash_log/')">
									<div class="icon icon-pink radius"><i class="icon icon-jiangjiatongzhi"></i></div>
									<div class="text">提现日志</div>
								</a>
							</div>
			</div>
			<div ng-if="pagedata.worker.type==1" class="fui-cell-group fui-cell-click mod-group radius">
					<a class="fui-cell">
								<div class="fui-cell-icon"><i class="icon icon-erweima"></i></div>
								<div class="fui-cell-text">
								 我的佣金
								</div>
								<div href="javascript:;" ng-click="access_json('jy_wxshifu/orderfee/')" class="fui-cell-remark">
									查看
								</div>
					</a>
			</div>
		</div>
	</div>
</div>
</div>
<div ng-if="pagedata.op == 'ruzhu'">
<div class="fui-header">
		<div class="fui-header-left" onclick="window.history.go(-1);">
            <a class="back"></a>
        </div>
		<div class="title">申请入驻</div>
		<div class="fui-header-right"></div>
</div>
<div class="fui-list-group merchgroup" ng-click="" style="margin-top:58px">
				<div class="fui-list jump">
					<a class="fui-list-media" ng-if="pagedata.worker.headimg">
						<img class="round" src="{{tomedia(pagedata.worker.headimg) || '../core/resource/images/nopic.jpg'}}" />
					</a>
					<a class="fui-list-media weui_uploader_input_wrp">
						<input class="weui_uploader_input" ng-click="up_file(pagedata.worker,'headimg','image')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
					</a>
				</div>
</div>
<div class="weui_cells weui_cells_form">
			  <div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">姓名</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.worker.name" placeholder="请输入您的真实姓名">
                </div>
            </div>
            <div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">手机</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.worker.mobile" placeholder="请输入您的手机号码">
                </div>
            </div> 
			<div class="weui_cell">
                <div class="weui_cell_hd"><label for="" class="weui_label">上门地址</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" ng-model="pagedata.worker.address" type="text" value="" placeholder="">
                </div>
                <div class="weui_cell_ft">
                    <i class="icon jinyunicon icon-ditu"></i>
                </div>
			</div>
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">证件</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.worker.zhengjian" placeholder="请输入您的身份证号码">
                </div>
            </div>
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">年纪</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.worker.age" placeholder="请输入您的年纪">
                </div>
            </div>
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">从事年限</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.worker.years" placeholder="请输入您的从事该行业服务年限">
                </div>
            </div>
			<div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">介绍自己</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.worker.remark" placeholder="请输入您的介绍">
                </div>
            </div>
			
</div>
<div class="weui_btn_area">
		 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.worker,'set')">提交</a>
</div>
</div>
<div ng-if="pagedata.op == 'check'">
	<div class="fui-content">
		<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true" >
			<div class="carousel-inner" role="listbox" style="height:6rem">
				<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.banner">
					<a href="#">
						<img src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
					</a>
				</div>
			</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.banner" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
		<div class="content-empty">
			  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您的入驻申请，还在审核中...</p>
		</div>
	</div>
</div>
<div ng-if="pagedata.op == 'set'">
<div class="fui-header">
		<div class="fui-header-left" onclick="window.history.go(-1);">
            <a class="back"></a>
        </div>
		<div class="title">个人设置</div>
		<div class="fui-header-right"></div>
</div>
<div class="jy-content">
<div class="fui-list-group merchgroup" style="margin-top:58px">
				<div class="fui-list jump">
					<a class="fui-list-media" ng-if="pagedata.worker.headimg">
						<img class="round" src="{{tomedia(pagedata.worker.headimg) || '../core/resource/images/nopic.jpg'}}" />
					</a>
					<a class="fui-list-media weui_uploader_input_wrp">
						<input class="weui_uploader_input" ng-click="up_file(pagedata.worker,'headimg','image')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
					</a>
				</div>
</div>
<div class="weui_cells weui_cells_form">
			  <div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">姓名</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.worker.title" placeholder="请输入您的真实姓名">
                </div>
            </div>
            <div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">手机</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.worker.mobile" placeholder="请输入您的手机号码">
                </div>
            </div> 
		<div class="weui_cell">
                <div class="weui_cell_hd"><label for="" class="weui_label">地址</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" ng-model="pagedata.worker.address" type="text" value="" placeholder="">
                </div>
                <div class="weui_cell_ft">
                    <i class="icon jinyunicon icon-ditu"></i>
                </div>
        </div>
</div>
</div>
<div class="weui_btn_area">
		 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.worker,'set')">提交</a>
</div>
</div>
<div class="fui-navbar">
	<a href="javascript:;" ng-click="access_json('jy_wxshifu/shifu_order/')" class="nav-item" style="background:#00c568;color:#fff">立即抢单</a>
	<a href="javascript:;" ng-click="access_json('jy_wxshifu/worker_order/')" class="nav-item" style="background:red;color:#fff">我的服务</a>
</div>
<div ng-if="pagedata.showyewu" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showyewu=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行“用户绑定”操作
				</div>
				<div class='fui-cell' style="padding-bottom:0">
					<div class="fui-cell-text c">
						<div class="img_box" id="show_verify_ewm">
						</div>
					</div>
				</div>
				<div class='fui-cell' style="margin-top:0;padding-top:0">
					<div class="fui-cell-text">
					<div class="error c">
						<p style="padding: 0 1.3rem">温馨提示：提供本二维码给准客户扫码！</p>
					</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="fe-floatright-bottom" style="bottom:5rem">
<a ng-if="pagedata.worker.online!=1" ng-click="pagedata.openvoice(true)" href="javascript:;"><i class="icon icon-lingsheng0"></i></a>
<a ng-if="pagedata.worker.online==1" ng-click="pagedata.openvoice(false)" href="javascript:;"><i class="icon icon-nolingsheng0"></i></a> 
</div>
<audio id="openvoice" controls preload="auto" style="display:none;">
	<source src="../core/resource/images/neworder.mp3"></source>
</audio>
<script type="text/javascript">
window.scope.location(function(res){
		console.log(res)
		scope.$apply(function(){
			scope.pagedata.worker.address = res.address;
		});
});
scope.pagedata.show_verify=function(){
	var url=scope.pagedata.worker.url;
	scope.tool.qr(url,'show_verify_ewm',150)
}
</script>
<script>
scope.pagedata.openvoice=function(type){
	if(!scope.pagedata.worker){
		return false;
	}
	var voicetime = 0;
    var openvoice;
	if(type!='start'){
		if(type){
			scope.pagedata.worker.online=1;
		}else{
			scope.pagedata.worker.online=0;
		}
	}
	if(type || scope.pagedata.worker.online==1){
		 openvoice = setInterval(() => {
			if(scope.pagedata.worker.online!=1){
				clearInterval(openvoice);
				return false;
			}
			scope.get('jy_wxshifu/index/getnew/',function(res){
						console.log('openvoice');console.log(res);
						if(res!='none'){
							if(!voicetime[res.id]){
								voicetime[res.id]=1;
								$("#openvoice")[0].play();
							}
						}
			});
		}, 5000);
	}else{
		scope.get('jy_wxshifu/index/setopenvoice/isopenvoice='+scope.pagedata.worker.online,function(res){});
	}
}
scope.pagedata.openvoice('start');
</script>